package lab03.test04;

import java.io.*;

public class Test {
    public static void main(String[] args) {
        String source = "D:\\source\\high.mp3";
        String target = "D:\\target";
        BufferedWriter writer = null;
        BufferedReader reader = null;
        try {
            reader = new BufferedReader(new FileReader(source));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        File file = new File(target);
        try {
            writer = new BufferedWriter(new FileWriter("E:\\target\\high.mp3"));
        } catch (IOException e) {
            e.printStackTrace();
        }
        try {
            writer.write(reader.read());
        } catch (IOException e) {
            e.printStackTrace();
        }
        for (File f : file.listFiles());
        if(file.isFile()){
            System.out.println("文件："+ file.getName());
        }
    }
}
